﻿ <!-- 侧边悬浮窗 -->
    <div class="floating-sidebar">
        <div class="sidebar-btn phone-btn">
            <div class="btn-icon">
                <!-- <i class="fas fa-phone"></i> -->
                <img src="../images/icon/floatBtn1.png"></img>
            </div>
            <div class="phone-detail">
                <div class="phone-number">0579 - 85129191</div>
            </div>
        </div>
        
       <div class="sidebar-btn wechat-btn">
            <div class="btn-icon">
                              <img src="../images/icon/floatBtn2.png"></img>

            </div>
            <div class="qrcode-popup">
                <div class="qrcode-img">

                 <img src="../images/rewgzh.jpg" />
                 <p>求职公众号</p>
                </div>
                <div class="qrcode-img">
               <img src="../images/ewm1.jpg" />
                 <p>企业公众号</p>
                </div>
               
            </div>
        </div>
        
        <div class="sidebar-btn edit-btn"  id="editHerf">
            <div class="btn-icon">
                                             <img src="../images/icon/floatBtn3.png"></img>

            </div>
        </div>
        
        <div class="sidebar-btn top-btn" id="backToTop">
            <div class="btn-icon">
                                                            <img src="../images/icon/floatBtn4.png"></img>

            </div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const backToTopBtn = document.getElementById('backToTop');
            console.log('返回顶部按钮:', backToTopBtn);
            const edit=document.getElementById('editHerf');
            // 返回顶部功能
            backToTopBtn.addEventListener('click', function() {
                console.log('点击返回顶部按钮');
                window.scrollTo({
                    top: 0,
                    behavior: 'smooth'
                });
            });
              edit.addEventListener('click', function() {
                console.log('点击返回顶部按钮');
                window.open('https://hxrc91job.mikecrm.com/Gg7ZWF')
            });
            
            // 监听滚动显示/隐藏返回顶部按钮
            window.addEventListener('scroll', function() {
                const scrollPosition = window.scrollY;
                
                if (scrollPosition > 300) {
                    backToTopBtn.style.display = 'flex';
                } else {
                    backToTopBtn.style.display = 'flex'; // 始终保持显示
                }
            });
        });
    </script>